package com.thiswhyme.discovery.server2.v1.feign;

import com.thiswhyme.common.response.ResponseVo;
import com.thiswhyme.discovery.server2.v1.dto.UserDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Created by thiswhyme on 2020/9/3.
 */
@FeignClient(name = "discovery-server1", fallback = UserFeignServiceFallback.class)
public interface UserFeignService {

    @GetMapping("/user1/user-list")
    ResponseVo<List<UserDto>> listUsers(@RequestParam("trace") String trace);

    @GetMapping("/user1/user-name")
    ResponseVo<String> queryUserName(@RequestParam("trace") String trace);
}
